<template>
    <div class="section-wrap danger">
        <!-- 头部 -->
        <div class="headerBox">
        <div class="header">
            <x-icon type="ios-arrow-left"
                    size=""
                    class="icon-white"
                    @click="goBack"></x-icon>问题登记
        </div>
        </div>
        <div class="form-section" style="margin-top: 40px;">
            <div class="form-item form-item-style1">
                <div class="label-title">
                    <label>被检查单位</label>
                    <i class="iconfont icon-required"></i>
                </div>
                <div class="input_div" @click="classValue=true">
                    <input type="text"
                       placeholder="请选择"
                       disabled v-model="subData.bcheckDeptName">
                       <x-icon type="ios-arrow-right" size="22" class="icon-right"></x-icon>
                </div>
            </div>
            <div class="form-item form-item-style1">
                <div class="label-title">
                    <label>被检查单位负责人</label>
                </div>
                <div class="input_div">
                    <input type="text"
                    disabled v-model="subData.bcheckDeptFzr" style="padding-right:10px"> 
                </div>
            </div>
            <div class="form-item form-item-style1">
                <div class="label-title">
                    <label>问题编号</label>
                </div>
                <div class="input_div">
                    <input type="text"
                       placeholder="系统生成" style="padding-right:10px"
                       disabled>
                </div>
            </div>
            <!-- <div class="form-item form-item-style1">
                <div class="label-title">
                    <label>问题级别</label>
                    <i class="iconfont icon-required"></i>
                </div>
                <div class="input_div" @click="classValue2=true">
                    <input type="text"
                       placeholder="请选择"
                       disabled v-model="subData.hiddenDangerLevel">
                    <x-icon type="ios-arrow-right" size="22" class="icon-right"></x-icon>
                </div>
            </div> -->
            <div class="form-item form-item-style1">
                <div class="label-title">
                    <label>项目类型</label>
                    <i class="iconfont icon-required"></i>
                </div>
                <div class="input_div" @click="classValue1=true">
                    <!-- <div class="input_div" @click="classValue1=true"> -->
                    <input type="text"
                       placeholder="请选择"
                       disabled v-model="subData.projectType">
                       <x-icon type="ios-arrow-right" size="22" class="icon-right"></x-icon>
                </div>
            </div>
            <div class="form-item form-item-style1">
                <div class="label-title">
                    <label>问题类别</label>
                    <i class="iconfont icon-required"></i>
                </div>
                <div class="input_div" @click="valueBtn3">
                    <input type="text"
                       placeholder="请选择"
                       disabled v-model="subData.hiddenDangerType">
                    <x-icon type="ios-arrow-right" size="22" class="icon-right"></x-icon>
                </div>
            </div>
            <div class="form-item form-item-style2">
                <div class="label-title">
                    <label>问题描述</label>
                    <i class="iconfont icon-required"></i>
                    <!-- <span style="float:right">请选择</span> -->
                    <div class="input_div"  style="width:260px" @click="valueBtn3_2">
                        <input type="text"
                        placeholder="请选择"
                        disabled style="float:right;margin-right:20px">
                    </div>
                </div>
                <div @click="amend3">
                    <textarea class="textarea"  placeholder="请输入（可自动换行)"  maxlength="200" v-model="subData.hiddenDangeDescription"></textarea>
                </div>
            </div>
            <div class="form-item form-item-style2">
                    <div class="label-title space-between">
                    <label>整改前图片<i class="iconfont icon-required"></i></label>
                    <!-- <span>当前共{{detailinfo.projectImgList!=null?detailinfo.projectImgList.length:0}}张照片</span> -->
                </div>
                <div class="upload-wrap">
                    <upload
                    :imgList="projectImgList1.rectifyImgList"
                    @setFormData="setYSFormData"
                    ></upload>
                </div>
            </div>
            <div class="form-item form-item-style2">
                <div class="label-title">
                    <label>整改要求</label>
                    <i class="iconfont icon-required"></i>
                </div>
                <div @click="amend4">
                    <textarea class="textarea" placeholder="请输入（可自动换行）" v-model="subData.measure"></textarea>
                </div>
            </div>
            <div class="form-item form-item-style1">
                <div class="label-title">
                    <label>整改开始时间</label>
                    <i class="iconfont icon-required"></i>
                </div>
                <group>
                    <datetime placeholder="请选择" format="YYYY-MM-DD HH:mm:00" v-model="subData.zgStartTime"></datetime>
                </group>
            </div>
            <div class="form-item form-item-style1">
                <div class="label-title">
                    <label>整改期限</label>
                    <i class="iconfont icon-required"></i>
                </div>
                <group>
                    <datetime placeholder="请选择" format="YYYY-MM-DD HH:mm:00" v-model="subData.zgEndTime"></datetime>
                </group>
            </div>
            <!-- <div class="form-item form-item-style1">
                <div class="label-title">
                    <label>问题部位</label>
                    <i class="iconfont icon-required"></i>
                </div>
                <div class="input_div"  @click="classValue4=true">
                    <input type="text"
                    placeholder="请输入"
                    disabled v-model="subData.hiddenDangePart">
                    <x-icon type="ios-arrow-right" size="22" class="icon-right"></x-icon>
                </div>
            </div> -->
            <div class="form-item form-item-style1">
                <div class="label-title">
                    <label>整改责任人</label>
                    <i class="iconfont icon-required"></i>
                </div>
                <div class="input_div" @click="getGroup(1)">
                    <input type="text"
                    placeholder="请选择"
                    disabled v-model="subData.zgZrrName">
                    <x-icon type="ios-arrow-right" size="22" class="icon-right"></x-icon>
                </div>
            </div>
            <!-- <div class="form-item form-item-style1">
                <div class="label-title">
                    <label>整改单位</label>
                    <i class="iconfont icon-required"></i>
                </div>
                <div class="input_div" @click="valueBtn(6)">
                    <input type="text"
                    placeholder="请选择"
                    disabled v-model="subData.zgDeptName">
                    <x-icon type="ios-arrow-right" size="22" class="icon-right"></x-icon>
                </div>
            </div>
            <div class="form-item form-item-style1">
                <div class="label-title">
                    <label>整改执行人</label>
                    <i class="iconfont icon-required"></i>
                </div>
                <div class="input_div">
                    <input type="text"
                    placeholder="请选择"
                    disabled v-model="subData.zgZxrName">
                    <x-icon type="ios-arrow-right" size="22" class="icon-right"></x-icon>
                </div>
            </div>
            <div class="form-item form-item-style1">
                <div class="label-title">
                    <label>整改班组</label>
                    <i class="iconfont icon-required"></i>
                </div>
                <div class="input_div" @click="valueBtn(8)">
                    <input type="text"
                    placeholder="请选择"
                    disabled v-model="subData.zgGroupName">
                    <x-icon type="ios-arrow-right" size="22" class="icon-right"></x-icon>
                </div>
            </div>
            <div class="form-item form-item-style1">
                <div class="label-title" style="width:120px">
                    <label style="width:120px">整改班组负责人</label>
                    <i class="iconfont icon-required"></i>
                </div>
                <div class="input_div">
                    <input type="text"
                    placeholder="请选择"
                    disabled v-model="subData.zgGroupFzrname" style="width:160px">
                    <x-icon type="ios-arrow-right" size="22" class="icon-right"></x-icon>
                </div>
            </div> -->
            <div class="info_div2">
                <div class="form-item">
                    <div>
                        <span>检查人信息</span>
                    </div>
                </div>
            </div>
            <div class="form-item form-item-style1">
                <div class="label-title">
                    <label>检查单位</label>
                </div>
                <div class="input_div">
                    <input type="text"
                    disabled v-model="subData.checkDeptName"> 
                </div>
            </div>
            <div class="form-item form-item-style1">
                <div class="label-title">
                    <label>检查人</label>
                </div>
                <div class="input_div">
                    <input type="text"
                    disabled v-model="subData.checkPerson"> 
                </div>
            </div>
            <div class="form-item form-item-style1">
                <div class="label-title">
                    <label>电话</label>
                </div>
                <div class="input_div">
                    <input type="text"
                    v-model="subData.telephone"
                    disabled> 
                </div>
            </div>
            <div class="form-item form-item-style1">
                <div class="label-title">
                    <label>检查时间</label>
                </div>
                <div class="input_div">
                    <input type="text"
                    v-model="subData.checkTime"
                    disabled> 
                </div>
            </div>
            <div class="form-item form-item-style1">
                <div class="label-title">
                    <label>所属上级单位</label>
                </div>
                <div class="input_div">
                    <input type="text"
                    v-model="subData.parentDeptName"
                    disabled> 
                </div>
            </div>
            <div class="info_div2">
                <div class="form-item">
                    <div>
                        <span>抄送信息</span>
                    </div>
                </div>
            </div>
            <div class="form-item form-item-style1">
                <div class="label-title">
                    <label>抄送人员</label>
                </div>
                <div class="input_div" @click="getGroup(2)">
                    <input type="text"
                    placeholder="请选择"
                    disabled 
                    v-model="subData.copytoPersonName">
                    <x-icon type="ios-arrow-right" size="22" class="icon-right"></x-icon>
                </div>
            </div>

        </div>
        <div class="btns">
            <button @click="handleSubmit()">提 交</button>
        </div>
        <div v-transfer-dom>
            <!-- 项目类型 -->
            <popup v-model="classValue1" width="100%">
                <div id="classValue2">
                    <ul class="popList">
                        <li :class="ind2==index ? 'active' : ''" v-for="(item,index) in radio000" :key="index" @click="change0(item,index)">
                            <p>{{item}}<img src="../../../static/images/list_checked.png"></p>
                        </li>
                    </ul>
                </div>
            </popup>
            <!-- 问题级别 -->
            <popup v-model="classValue2" width="100%">
                <div id="classValue2">
                    <!-- <group>
                        <radio :options="radio001" @on-change="change1"></radio>
                    </group> -->
                    <ul class="popList">
                        <li :class="ind==index ? 'active' : ''" v-for="(item,index) in radio001" :key="index" @click="radioLi(item,index)">
                            <p>{{item}}<img src="../../../static/images/list_checked.png"></p>
                        </li>
                    </ul>
                </div>
            </popup>
            <!-- 问题类别 -->
            <popup v-model="classValue3" width="100%">
                <div id="classValue2">
                    <!-- <group>
                        <radio :options="radio002" @on-change="change2"></radio>
                    </group> -->
                    <ul class="popList">
                        <li :class="ind3==index ? 'active' : ''" v-for="(item,index) in radio002" :key="index" @click="change2(item,index)">
                            <p>{{item}}<img src="../../../static/images/list_checked.png"></p>
                        </li>
                    </ul>
                </div>
            </popup>
            <!-- 问题描述 -->
            <popup v-model="classValue3_2" width="100%">
                <div class="divClass" id="classValue2">
                    <ul class="hiddden">
                        <li :class="ind4==index ? 'active' : ''" v-for="(item,index) in radio003" :key="index" @click="change3(item,index)">
                            <p>{{item}}</p>
                            <img src="../../../static/images/list_checked.png">
                        </li>
                    </ul>
                </div>
            </popup>
            <!-- <popup v-model="classValue3_2" width="100%">
                <div class="divClass" id="sle3">
                    <group>
                        <radio :options="radio003" @on-change="change3"></radio>
                    </group>
                </div>
            </popup> -->
            <popup v-model="classValue3_3" width="100%" height="300px">
                <group>
                        <x-textarea :max="200" :rows="7" name="description" placeholder="请输入" v-model="checkData" id="tt"></x-textarea>
                </group>
                <p class="transfer_p"><span @click="ent">确定</span> <em @click="clear">清空</em></p>
            </popup>
            <popup v-model="classValue11" width="100%" height="300px">
                <group>
                        <x-textarea :max="500" :rows="7" name="description" placeholder="请输入" v-model="checkData11" id="tt"></x-textarea>
                </group>
                <p class="transfer_p"><span @click="ent11">确定</span> <em @click="clear11">清空</em></p>
            </popup>
                 <!-- 检查记录修改 -->
            <popup v-model="classValue4" width="100%" height="300px">
                <group>
                        <x-textarea :max="200" :rows="7" name="description" placeholder="请输入" v-model="checkData2" id="tt"></x-textarea>
                </group>
                <p class="transfer_p"><span @click="ent2">确定</span> <em @click="clear2">清空</em></p>
            </popup>
            <!-- 整改责任人 -->
            <popup v-model="classValue5" width="100%" >
                <select-depart :data="data2" @selectUser='selectUser'></select-depart>
            </popup>
            <!-- 整改单位 -->
            <popup v-model="classValue6" width="100%">
                <div class="divClass" id="sle5">
                    <group>
                        <radio :options="radio006" @on-change="change6"></radio>
                    </group>
                </div>
            </popup>
            <!-- 整改班组 -->
            <popup v-model="classValue8" width="100%">
                <div class="divClass" id="sle5">
                    <group>
                        <radio :options="radio008" @on-change="change8" style="background"></radio>
                    </group>
                </div>
            </popup>
        </div>
    </div>
</template>
<script>
import formatDate from "@/utils/formatDate";
import upload from "@/commonComponents/upload/upload";
import ztree from "@commonComponents/tree"
import selectDepart from "@commonComponents/selectDepartUser/selectUser";
import {
    XHeader,
    Tabbar,
    TabbarItem,
    Group,
    Cell,
    TransferDom,
    Popup,
    Checklist,
} from "vux";
export default {
    data () {
        return {
            checkData11:'',
            classValue11:false,
            ind2:9999,
            ind3:9999,
            ind4:9999,
            idArr:{},
            spanData:'',
            subLayerUnitList:[],
            layerUnitList:[],
            radio000:[],
            radio001:[],
            radio002:[],
            radio003:[],
            radio006:[],
            radio007:[],
            radio008:[],
            radio009:[],
            checkData:'',
            checkData2:'',
            def:'',
            data:[],
            data2:[],
            checkedList: [],
            lis: [{ checkedList: [], }],
            index: '',
            ind:'9999',
            dataList: [],
            classValue: false,
            classValue1: false,
            classValue2: false,
            classValue3: false,
            classValue3_2:false,
            classValue3_3:false,
            classValue4: false,
            classValue5: false,
            classValue6: false,
            classValue7: false,
            classValue8: false,
            classValue9: false,
            classValue10: false,
            selectDepartType: 0,
            typeNum: "",
            classValue: false,
            data: [],
            YSFormData: "",
            overTime: formatDate(),
            projectImgList1: [],
            detailinfo: {},
            subData:{
                type:'dj',
                checkworkId:''
            },
            arrList:[],
            arrList2:[],
            arrList3:[],
            now:''
        };
    },
    created () {

    },
    mounted(){
        this.level()
        this.detailinfo.weizAbarbeitungStartDate = this.getyear();
        this.detailinfo.weizAbarbeitungEndDate =this.getyear();
        this.detailinfo.weizDate = this.getyear();
        this.subData.checkworkId=this.$route.query.id
        this.project()
        var item =this.$store.state.addCheck
        this.subData.bcheckDeptId=item.id           // 参建单位ID
        this.subData.bcheckDeptFzr=item.charge      // 被检查单位负责人
        this.classValue = false;
        // 人员接口
        this.$axiosAjax.getDivision({classifyId: ''}).then((res) => {
            if (res.data.success == true) {
                this.data2 = res.data.result
            }
        }).catch((err) => {
            console.log(err)
            }
        )
        function conver(s) {
            return s < 10 ? '0' + s : s;
        }
        var myDate = new Date();
        var year = myDate.getFullYear();
        var month = myDate.getMonth() + 1;
        var date = myDate.getDate();
        var h = myDate.getHours(); //获取当前小时数(0-23)
        var m = myDate.getMinutes(); //获取当前分钟数(0-59)
        var s = myDate.getSeconds();
        this.subData.checkTime = year + '-' + conver(month) + "-" + conver(date) + " " + conver(h) + ':' + conver(m) + ":" + conver(s);
    },
    components: {
        ztree, Popup, selectDepart,
        upload,Checklist
    },
    directives: {
        TransferDom
    },
    methods: {
        // 获取人员数据
        getGroup (index) {
            this.groupIndex=index
            this.classValue5 = true;
        },
        // 人员选择
        selectUser(data) {
            if (this.groupIndex==1){  // 整改责任人
                this.subData.zgZrrName=data.userName
                this.subData.zgZrrId=data.userAccount
            } else if (this.groupIndex==2){  // 抄送人
                this.subData.copytoPersonName=data.userName
                this.subData.copytoPersonId=data.id
            }
            this.classValue5 = false
        },
        amend4(){
            this.classValue11=true
            this.checkData11=this.subData.measure
        },
        ent11 (){
            this.classValue11=false
            this.subData.measure=this.checkData11
        },
        clear11(){
            this.classValue11=false
        },
        radioLi(item,index){
            this.ind=index
            this.subData.hiddenDangerLevel=item
            this.classValue2=false
        },
        setYSFormData (setFormDatalength, file) {
            // this.YSFormData = formData;
            var arr =[]
            for (var k of file){
                arr.push(k.id)
            }
            this.subData.fileList=arr
        },
        getyear(){
            return new Date().getFullYear()+'-'+new Date().getMonth()+'-'+new Date().getDate();
        },
        goBack () {
            this.$router.go(-1)
        },
        // 提交
        handleSubmit () {
            if (new Date(this.subData.zgStartTime).getTime() > new Date(this.subData.zgEndTime).getTime()) {
                this.$vux.toast.text('整改期限必须大于整改开始时间')
                return false
            }
            if(this.subData.bcheckDeptName&&
                this.subData.projectType&&
                this.subData.hiddenDangerType&&
                this.subData.hiddenDangeDescription&&
                this.subData.measure&&
                this.subData.zgStartTime&&
                this.subData.zgEndTime&&
                this.subData.zgZrrName&&
                this.subData.fileList&&
                this.subData.fileList.length != 0
            ){this.$axiosAjax.submitHiddenDangerInfoAPP(this.subData).then((res) => {
                    if (res.data.success == true) {
                        this.$vux.toast.text('提交成功')
                        this.$router.go(-1)
                    }
                }).catch((err) => {
                    console.log(err)
                    }
                )
            } else if(!this.subData.bcheckDeptName){
                this.$vux.toast.text('被检查单位必填')
            }else if(!this.subData.projectType){
                this.$vux.toast.text('项目类型必填')
            }else if(!this.subData.hiddenDangerType){
                this.$vux.toast.text('问题类别必填')
            }else if(!this.subData.hiddenDangeDescription){
                this.$vux.toast.text('问题描述必填')
            }else if(!this.subData.measure){
                this.$vux.toast.text('整改要求必填')
            }else if(!this.subData.zgStartTime){
                this.$vux.toast.text('整改开始时间')
            }else if(!this.subData.zgEndTime){
                this.$vux.toast.text('整改期限')
            }else if(!this.subData.zgZrrName){
                this.$vux.toast.text('整改责任人必填')
            }else if(!this.subData.fileList || this.subData.fileList.length == 0){
                this.$vux.toast.text('整改前图片必传')
            }
            // else if(!this.subData.zgDeptName){
            //     this.$vux.toast.text('整改单位必填')
            // }else if(!this.subData.zgZxrName){
            //     this.$vux.toast.text('整改执行人必填')
            // }else if(!this.subData.zgGroupName){
            //     this.$vux.toast.text('整改班组必填')
            // }else if(!this.subData.zgGroupFzrname){
            //     this.$vux.toast.text('整改班组负责人必填')
            // }

        },
        // 问题级别
        level(){
            this.$axiosAjax.getHiddenDangerLevel({}).then((res) => {
                if (res.data.success == true) {
                    var list =res.data.result
                    var arr=[]
                    for(var k of list){
                        arr.push(k.codeName)
                    }
                    this.radio001=arr
                }
            }).catch((err) => {
                console.log(err)
                }
            )
        },
        // 问题级别
        change1 (value, label) {
            console.log('change:', value, label)
            this.subData.hiddenDangerLevel=value
            this.classValue2=false
        },
        // 项目类型
        project(){
            this.$axiosAjax.getHiddenDangerProject({}).then((res) => {
                if (res.data.success == true) {
                    var list =res.data.result
                    this.arrList=list
                    var arr=[]
                    for(var k of list){
                        arr.push(k.type)
                    }
                    this.radio000=arr
                    this.getInfo()
                }
            }).catch((err) => {
                console.log(err)
                }
            )
        },
        getInfo(){
            this.$axiosAjax.getSafeDetails({planId:this.$route.query.id}).then(res => {
                if(res.data.success==true){
                    this.subData.bcheckDeptName=res.data.result.projectName // 被检查单位
                    // this.subData.bcheckDeptId=res.data.result.projectId     // 检查单位id
                    // this.subData.bcheckDeptFzr=res.data.result.projectDuty     
                    this.subData.telephone=res.data.result.telephone             // 电话
                    var list =res.data.result.divisionList
                    var str= ''
                    for(var k of list){
                        str+=k.divisionProsonName+','
                    }
                    this.subData.checkPerson=str.substr(0,str.length-1)  // 检查人
                    // this.subData.checkPerson=res.data.result.createUser   // 检查人ID res.data.result.projectType
                    this.subData.projectType=''   // 项目类型 
                    this.subData.checkDeptName=this.$store.state.departNanme   // 检查单位
                    this.subData.checkDeptId=this.$store.state.departId    // 检查单位ID
                    this.subData.zgZrrName=res.data.result.projectDuty   // 整改责任人
                    this.subData.zgZrrId=res.data.result.projectDutyId // 整改责任人id
                    // this.subData.checkTime=res.data.result.checkDate        // 时间
                    this.subData.parentDeptName=res.data.result.parentName  // 所属上级单位
                    for(var k of this.arrList){
                        if (k.type==this.subData.projectType){
                            this.$axiosAjax.getHiddenDangerStatus2({hiddrenTypeId:k.id}).then((res) => {
                                if (res.data.success == true) {
                                    var list =res.data.result
                                    this.arrList2=list
                                    var arr=[]
                                    for(var k of list){
                                        arr.push(k.type)
                                    }
                                    this.radio002=arr
                                }
                            }).catch((err) => {
                                console.log(err)
                                }
                            )
                        }
                    }
                    this.$axiosAjax.getDepartListzg({bcheckDeptId:res.data.result.projectId}).then((res) => {
                        if (res.data.success == true) {
                            var list=res.data.result
                            var arr6 =[]
                            var arr7 =[]
                            var arr8 =[]
                            var arr9 =[]
                            // 单位
                            this.subLayerUnitList=res.data.result.subLayerUnitList
                            for (var k of list.subLayerUnitList){
                                arr6.push(k.departName)
                                arr7.push(k.layerDeptUser)
                            }
                            this.radio006=arr6
                            this.radio007=arr7
                            // 班组
                            this.layerUnitList=res.data.result.layerUnitList
                            for (var k of list.layerUnitList){
                                arr8.push(k.departName)
                                arr9.push(k.layerDeptUser)
                            }
                            this.radio008=arr8
                            this.radio009=arr9
                        }
                    }).catch((err) => {
                        console.log(err)
                        }
                    )
                }
            });
        },
        // 项目类型
        change0 (value, index) {
            console.log('change:', value)
            this.ind2=index
            this.subData.projectType=value
            var id=''
            for (var k of this.arrList){
                if (k.type==value){
                    id=k.id
                }
            }
            this.classValue1=false
            this.$axiosAjax.getHiddenDangerStatus2({hiddrenTypeId:id}).then((res) => {
                if (res.data.success == true) {
                    var list =res.data.result
                    this.arrList2=list
                    var arr=[]
                    for(var k of list){
                        arr.push(k.type)
                    }
                    this.radio002=arr
                }
            }).catch((err) => {
                console.log(err)
                }
            )
        },
        // 项目类别前的验证
        valueBtn3(){
            if(this.subData.projectType){
                this.classValue3=true
            }else{
                this.$vux.toast.text('先选择项目类型')
            }
        },
        // 项目类别前的验证
        valueBtn3_2(){
            if(this.subData.projectType&&this.subData.hiddenDangerType){
                this.classValue3_2=true
            }else if(!this.subData.projectType){
                this.$vux.toast.text('先选择项目类型')
            }else if(!this.subData.hiddenDangerType){
                this.$vux.toast.text('先选择问题类别')
            }
        },
        // 抄送人
        valueBtn10(){
            if (this.subData.bcheckDeptName){
                this.classValue10=true
            }else {
                this.$vux.toast.text('请先选择被检查单位')
            }
        },
        // 问题类别
        change2 (value, index) {
            this.ind3=index
            this.subData.hiddenDangerType=value
            this.classValue3=false
            var id=''
            for (var k of this.arrList2){
                if (k.type==value){
                    id=k.id
                }
            }
            this.$axiosAjax.getStandard({parentId:id}).then((res) => {
                if (res.data.success == true) {
                    var list =res.data.result.items
                    this.arrList3=list
                    var arr=[]
                    for(var k of list){
                        arr.push(k.checkStandard)
                    }
                    this.radio003=arr
                }
            }).catch((err) => {
                console.log(err)
                }
            )
        },
        change3 (value, label) {
            this.ind4 = label
            this.subData.hiddenDangeDescription=value
            for(var k of this.arrList3){
                if (k.checkStandard==value){
                    this.subData.measure=k.resolveMeasure
                }
            }
            this.classValue3_2=false
        },
        // 整改单位 执行人,班组,负责人 按钮
        valueBtn(index){
            if (this.subData.bcheckDeptName){
                if (index==6){
                    this.classValue6=true
                }if (index==8){
                    this.classValue8=true
                }
            }else{
                this.$vux.toast.text('请先选择被检查单位')
            }
        },
        change6 (value, label) {
            for (var k of this.subLayerUnitList){
                if (k.departName==value){
                    this.subData.zgDeptId=k.id
                    this.subData.zgZxrName=k.layerDeptUser
                }
            }
            this.subData.zgDeptName=value
            this.classValue6=false
        },
        // change7 (value, label) {
        //     this.subData.zgZxrName=value
        //     this.classValue7=false
        // },
        // 班组
        change8 (value, label) {
            for (var k of this.layerUnitList){
                if (k.departName==value){
                    this.subData.zgGroupId=k.id
                    this.subData.zgGroupFzrname=k.layerDeptUser
                }
            }
            this.subData.zgGroupName=value
            this.classValue8=false
        },
        // change9 (value, label) {
        //     this.subData.zgGroupFzrname=value
        //     this.classValue9=false
        // },
        // 点击问题描述修改
        amend3(){
            if(this.subData.projectType&&this.subData.hiddenDangerType&&this.subData.hiddenDangeDescription){
                this.classValue3_3=true
                this.checkData=this.subData.hiddenDangeDescription
            }else if(!this.subData.projectType){
                this.$vux.toast.text('先选择项目类型')
            }else if(!this.subData.hiddenDangerType){
                this.$vux.toast.text('先选择问题类别')
            }
            // else if (!this.subData.hiddenDangeDescription){
            //     this.$vux.toast.text('先选择问题描述')
            // }
            
        },
        ent(){
            this.subData.hiddenDangeDescription=this.checkData
            this.classValue3_3=false
        },
        clear(){
            this.checkData=''
            this.classValue3_3=false
        },
        ent2(){
            this.subData.hiddenDangePart=this.checkData2
            this.classValue4=false
        },
        clear2(){
            this.checkData2=''
            this.classValue4=false
        },
    }
};
</script>
<style lang="less" scoped>
.textarea{
    margin: 0;
    resize: none;
    line-height: 20px;
    height: 64px;
    --webkit-line-clamo:2;
    --webkit-box-orient:vertical;
    overflow: hidden;/*超出部分隐藏*/
    text-overflow:ellipsis;/*文字超出部分以省略号显示*/
}
.upload-item{
    position: relative;
    input[type="file"]{
        height: 86px;
        width: 86px;
        position: absolute;
        left: 0;
        top: 0;
        opacity: 0;
    }
}
.info_div2 {
    .form-item {
        height: auto;
    }
}
.form-item {
    .input_div {
        .vux-x-icon {
            fill: #999;
            float: right;
            margin-top: 16px!important;
        }
    }
    .line_20 {
        line-height: 20px;
    }
}
.line {
    height: 5px;
    background: #ebeef2;
}
.danger{
    .btns{
        button{
            width: 70%;
        }
    }
}
.transfer_p{
    padding: 10px 20px;
    height: 30px;
    span,em{
        width: 60px;
        height: 30px;
        text-align: center;
        line-height: 32px;
        font-size: 16px;
        border-radius: 5px;
        color: #fff;
        letter-spacing: 1px;
    }
    span{
        float: right;
        background-color:#2abf72;
    }
    em{
        float: left;
        background-color: #ceaa6c;
    }
}
.danger .vux-cell-placeholder{
    font-size: 14px;
    margin-right: 10px!important;
}
.danger .input_div input{
    width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.divClass{
    width: 100%;
    min-height: 300px;
    overflow-y: scroll;
}
.divClass2{
    width: 100%;
    min-height: 300px;
    position: relative;
    #divClass2{
        height: 260px;
        overflow-y: scroll;
    }
    p{
        height: 30px;
        width: 100%;
        position: absolute;
        padding: 0 20px;
        bottom: 4px;
        span,em{
            width: 60px;
            height: 30px;
            text-align: center;
            line-height: 30px;
            font-size: 16px;
            border-radius: 5px;
            color: #fff;
        }
        span{
            float: left;
            background-color:#2abf72;
        }
        em{
            float: right;
            background-color: #ceaa6c;
        }
    }
}
#uu,#sle,#sle2,#sle3,#sle4{
    max-height: 300px;
    min-height: 200px;
    overflow-y: scroll;
    .weui-cell__bd {
        color: #333;
        width: 300px;
    }
}
#classValue2{
  .popList {
    height: 224px;
    li {
        height: 46px;
        border-bottom: 1px solid #f0f1f5;
        position: relative;
        background-color: #fff;
        p {
            width: 100%;
            height: 45px;
            line-height: 45px;
            position: absolute;
            left: 50%;
            top: 0;
            transform: translate(-50%, 0);
            font-size: 14px;
            margin-left: 12px;
            text-align: center;
           
            img {
                height: 14px;
                width: 14px;
                margin-left: 10px;
                vertical-align: middle;
                position: relative;
                top: -1px;
                opacity: 0;
            }
        }
    }
    li.active {
        p {
        color: #469b7a;
        }
        img {
        opacity: 1;
        }
    }
  }
  &.divClass {
      width: 100%;
      height: 300px;
      overflow-y: scroll;
      .hiddden {
            li.active {
            p {
            color: #469b7a;
            }
            img {
            opacity: 1;
            }
        }
          li {
              min-height: 46px;
              border-bottom: 1px solid #f0f1f5;
              position: relative;
              background-color: #fff;
              padding: 20px 0;
              p {
                  width: 90%;
                  box-sizing: border-box;
                  display: inline-block;
                  padding: 0 10px 0 20px;
              }
              img {
                  height: 14px;
                  width: 14px;
                  vertical-align: middle;
                  position: relative;
                  top: -10px;
                  opacity: 0;
              }
          }
      }
  }
}
</style>
